package cc.md888.app.application.ip;

import cc.md888.app.infr.ip.IpInfoProvider;
import cc.md888.app.infr.ip.IpInfoVO;
import cc.md888.app.model.common.IpInfoCmd;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class IpInfoService {

    @Autowired
    private IpInfoProvider  provider;


    /**
     * 获取ip信息
     * @param cmd
     * @return
     */
    public IpInfoVO getIpInfo(IpInfoCmd cmd) {
        return provider.get(cmd.getIp());
    }

}
